//q10.cpp
//This program takes a coord on the number grid and print the possible ways of getting there.
//
//Binyamin 11 Jan 2018
//=========================================================================================

#include <iostream>

using namespace std;

//paths
//input: coords
//output: possible methods of getting there.
int paths(int x, int y)
{
	if(x==0) return 1;
	if(y==0) return 1;
	return paths(x-1, y) + paths(x, y-1);
}

//1. prompt the user for a path
//2. capture the path.
//3. print the number of methods of getting there.
int main()
{
	int x,y; // user input for the path.
	cout << "Please enter a x and y for the destination" << endl;
	cin >>x >> y;
	cout << "There are " << paths(x, y) << " ways of getting there" << endl;
	return 0;
}
//output
//Please enter a x and y for the destination
//2 2
//There are 6 ways of getting there
